<!--{template admin/header}-->
<body id="homepage">
    <div id="breadcrumb">
        <ul>
            <li><img src="static/img/icons/icon_breadcrumb.png"
                     alt="Location" /></li>
            <li><strong>位置:</strong></li>
            <li><a href="admin.php">主页</a> - 用户中心</li>
        </ul>
    </div>
    <div id="rightside" class="user_info">
        <div class="contentcontainer">
            <div class="headings altheading"><h3>用户中心</h3></div>
            <div class="contentbox">
           		<div class="alert alert-info">
	              	<strong>用户头像相册!</strong>
	            </div>
            	<div>
            		<ul class="thumbnails">
            			<!--{if $userData['userInfo']['photos']}-->
	            			<!--{loop $userData['userInfo']['photos'] $photo}-->
				            <li class="span2">
				              <a href="#" class="thumbnail">
				                <img data-src="$photo" alt="80x80" style="width: 80px; height: 80px;" src="$photo">
				              </a>
				            </li>
				            <!--{/loop}-->
				        <!--{else}-->
				        	<li class="span2">
				              <a href="#" class="thumbnail">
				                <img data-src="http://share.fenfenriji.com/static/images/default.png" alt="80x80" style="width: 80px; height: 80px;" src="http://share.fenfenriji.com/static/images/default.png">
				              </a>
				            </li>
				        <!--{/if}-->
		          	</ul>
            	</div>
           		<div class="alert alert-info">
	              	<strong>用户信息!</strong>包括用户的计数及对用户的操作!
	            </div>
            	<div class="user-info-left span5" >
	                <table class="table table-bordered table-striped">
					    <colgroup>
					    	<col class="span1">
					    	<col class="span3">
					    </colgroup>
					    <thead>
					    	<tr>
								<th>用户</th>
								<th>Description</th>
					      	</tr>
					    </thead>
					    <tbody>
					      	<tr>
								<td><code>UID</code></td>
								<td>{$userData['userInfo'][uid]}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>昵称</code></td>
								<td>{$userData['userInfo'][nickname]}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>签名</code></td>
								<td>
									<!--{if $userData['userInfo']['signature']}-->
		                        	{$userData['userInfo'][signature]}
		                        	<!--{else}-->
									暂无签名
		                        	<!--{/if}-->
								</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>注册</code></td>
								<td>{$userData['userInfo'][registerDate]}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>性别</code></td>
								<td>
									<!--{if $userData['userInfo']['sex'] != 0}-->
		                        	男<!--{else}-->女
		                        	<!--{/if}-->
								</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>达人</code></td>
								<td>
									<!--{if $userData['userInfo']['is_ability'] == 0}-->
		                        	NO<!--{else}-->YES
		                        	<!--{/if}-->
								</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>生日</code></td>
								<td>{$userData['userInfo']['birthday']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>关注</code></td>
								<td>
									<!--{if $userData['userInfo']['is_mefollow'] == 0}-->
		                        	NO<!--{else}-->YES
		                        	<!--{/if}-->
								</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>经验值</code></td>
								<td>
									{$userData['userMember']['level']}级【经验值{$userData['userMember']['exp']}/{$userData['userMember']['nextLevelExp']}】
								</td>
						    </tr>
					    </tbody>
				  	</table>
				</div>
				<div class="user-info-left span5" >
					<table class="table table-bordered table-striped">
					    <colgroup>
					    	<col class="span1">
					    	<col class="span3">
					    </colgroup>
					    <thead>
					    	<tr>
								<th>计数</th>
								<th>Description</th>
					      	</tr>
					    </thead>
					    <tbody>
					      	<tr>
								<td><code>点滴</code></td>
								<td>{$userData['userStatistics']['diaryTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>话题</code></td>
								<td>{$userData['userStatistics']['topicTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>精华话题数</code></td>
								<td>{$total}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>私密</code></td>
								<td>{$userData['userStatistics']['secretDiaryTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>关注</code></td>
								<td>{$userData['userStatistics']['meFollowTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>粉丝</code></td>
								<td>{$userData['userStatistics']['followMeTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>评论数</code></td>
								<td>{$userData['userStatistics']['commentTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>被评论数</code></td>
								<td>{$userData['userStatistics']['commentMeTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>喜欢数</code></td>
								<td>{$userData['userStatistics']['likeTimes']}</td>
						    </tr>
					    </tbody>
					    <tbody>
					      	<tr>
								<td><code>被喜欢数</code></td>
								<td>{$userData['userStatistics']['likeMeTimes']}</td>
						    </tr>
					    </tbody>
				  	</table>
				</div>
				<div class="user-info-left span6" >
					<table class="table table-bordered table-striped">
					    <colgroup>
					    	<col class="span1">
					    	<col class="span5">
					    </colgroup>
					    <thead>
					    	<tr>
								<th>管理</th>
								<th>操作</th>
					      	</tr>
					    </thead>
					    <tbody>
						    <tr>
								<td><code>禁言管理</code></td>
								<td>
									<form id="shutUpUser" class="form-inline" method="get" action="admin.php" >
										<input type='text' name='time' class="input-small" placeholder="禁言天数"/>
										<input type='hidden' name='uid' value="$_GET[uid]"/>
				                        <input type='hidden' name='op' value='actionManage'/>
										<input type='hidden' name='action' value='shutUpUser'/>
										<input type='hidden' name='ac' value='manage'/>
									  	<button type="button" class="btn jinzhishuoming">禁言</button>
									</form>
								</td>
						    </tr>
							<tr id="jybz">
								<td><code>禁言备注</code></td>
								<td id="jybzMsg">
										{$jybz}
								</td>
							</tr>
						    <tr>
								<td><code>重置密码</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="text" name="passwd" class="input-small" placeholder="新密码" value="">
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="modifyUserPasswd" />
									  	<button type="submit" class="btn">提交</button>
									</form>
								</td>
						    </tr>
					      	<tr>
								<td><code>修改经验</code></td>
								<td>
									<button href="#changeUserExp" role="button" class="btn btn-primary btn-small" data-toggle="modal">修改经验</button>
									<div id="changeUserExp" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabele" aria-hidden="true">
									  <form action="admin.php?ac=user_profile&op=modifyUserLevelExp" method="post">
										  <div class="modal-header">
											    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
											    <h3 id="myModalLabele">经验值修改</h3>
										  </div>
										  <div class="modal-body nav-category">
												<div class="control-group">
													<label class="control-label" for="exp">增加(减少)经验值</label>
													<div class="controls">
														<input type="text" name="exp" id="exp" class="input-large" placeholder="经验值,减经验值填写负数" value="">
													</div>
												</div>
												<div class="control-group">
													<label class="control-label" for="contente">通知编辑</label>
													<div class="controls">
														<textarea style="width: 500px; height: 100px;" name='content' id="contente" placeholder="通知内容填写"></textarea>
													</div>
												</div>
									  	    </div>
										    <div class="modal-footer">
										  	    <input type="hidden" name="uid" value="$_GET[uid]" />
						                        <input type="hidden" name="ac" value="user_profile" />
						                        <input type="hidden" name="op" value="modifyUserLevelExp" />
											    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
											    <button type="submit" class="btn btn-primary">提交</button>
										    </div>
									  </form>
									</div>
								</td>
						    </tr>
						    <tr>
								<td><code>修改金币</code></td>
								<td>
									<button href="#changeUserCoin" role="button" class="btn btn-primary btn-small" data-toggle="modal">修改金币</button>
									<div id="changeUserCoin" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									  <form action="admin.php" method="get">
										  <div class="modal-header">
											    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
											    <h3 id="myModalLabel">金币值修改</h3>
										  </div>
										  <div class="modal-body nav-category">
												<div class="control-group">
													<label class="control-label" for="coin">增加(减少)金币值</label>
													<div class="controls">
														<input type="text" name="coin"  id="coin" class="input-large" placeholder="每次最高加200粉币" value="">
													</div>
												</div>
												<div class="control-group">
													<label class="control-label" for="content">通知编辑</label>
													<div class="controls">
														<textarea style="width: 500px; height: 100px;" name='content' id="content" placeholder="通知内容填写"></textarea>
													</div>
												</div>
									  	    </div>
										    <div class="modal-footer">
										  	    <input type="hidden" name="uid" value="$_GET[uid]" />
						                        <input type="hidden" name="ac" value="user_profile" />
						                        <input type="hidden" name="op" value="changeUserCoin" />
											    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
											    <button type="submit" class="btn btn-primary">提交</button>
										    </div>
									  </form>
									</div>
								</td>
						    </tr>
						    <!--{if $userData['userInfo']['is_ability'] == 1}-->
						    <tr>
								<td><code>修改达人等级</code></td>
								<td>
									<button href="#changeAbilityLevel" role="button" class="btn btn-primary btn-small" data-toggle="modal">修改达人等级</button>
									<div id="changeAbilityLevel" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabela" aria-hidden="true">
									  <form action="admin.php" method="get">
										  <div class="modal-header">
											    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
											    <h3 id="myModalLabela">修改达人等级</h3>
										  </div>
										  <div class="modal-body nav-category">
												<div class="control-group">
													<label class="control-label" for="level">修改达人等级</label>
													<div class="controls">
														<input type="text" name="level" id="level" class="input-large" placeholder="填写的值为修改后显示的值" value="">
													</div>
												</div>
									  	    </div>
										    <div class="modal-footer">
										  	    <input type="hidden" name="uid" value="$_GET[uid]" />
						                        <input type="hidden" name="ac" value="ability" />
						                        <input type="hidden" name="op" value="setAbility" />
											    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
											    <button type="submit" class="btn btn-primary">提交</button>
										    </div>
									  </form>
									</div>
								</td>
						    </tr>
						    <!--{/if}-->
						    <tr>
								<td><code>点击加入达人(堂)</code></td>
								<td>
									<button href="#addAbilityAndExpert" role="button" class="btn btn-primary btn-small" data-toggle="modal">点击成为达人</button>
									<div id="addAbilityAndExpert" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabelb" aria-hidden="true">
									  <form action="admin.php" method="get">
										  <div class="modal-header">
											    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
											    <h3 id="myModalLabelb">点击加入达人及名人堂</h3>
										  </div>
										  <div class="modal-body nav-category">
												<div class="control-group">
													<label class="control-label" for="label">达人类别</label>
													<div class="controls">
														<select name='label' class="span2" id="label">
															<option value='1'>情感达人</option>
															<option value='5'>健康达人</option>
															<option value='6'>美妆达人</option>
															<option value='7'>星座达人</option>
															<option value='9'>摄影达人</option>
															<option value='10'>搞笑达人</option>
														</select>
													</div>
												</div>
												<div class="control-group">
													<label class="control-label" for="introduction">达人宣言</label>
													<div class="controls">
														<textarea style="width: 500px; height: 100px;" name='introduction' id="introduction" placeholder="达人宣言"></textarea>
													</div>
												</div>
									  	    </div>
										    <div class="modal-footer">
										  	    <input type='hidden' name='op' value='setAbility'/>
												<input type='hidden' name='ac' value='ability'/>
												<input type='hidden' name='status' value='1'/>
												<input type='hidden' name='uid' value="$_GET[uid]" />
											    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
											    <button type="submit" class="btn btn-primary">添加</button>
										    </div>
									  </form>
									</div>
								</td>
						    </tr>
						    <tr>
								<td><code>删除用户所有日记</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="delAllDiary" />
				                        <Button class="btn" >删除用户所有日记</button>
									</form>
								</td>
						    </tr>
						    <tr>
								<td><code>删除用户所有日记评论</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="removeAllComment" />
				                        <Button class="btn" >删除用户所有日记评论</button>
									</form>
								</td>
						    </tr>
						    <tr>
								<td><code>恢复用户所有日记</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="restoreAllDiary" />
				                        <Button class="btn" >恢复用户所有日记</button>
									</form>
								</td>
						    </tr>
						    <!--
						    <tr>
								<td><code>恢复用户同步记录</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="regainCloudSync" />
				                        <Button class="btn" onclick="ajaxgetform($('#regain'));return false;" >恢复用户同步记录</button>
									</form>
								</td>
						    </tr>
						    <tr>
								<td><code>删除用户同步记录</code></td>
								<td>
									<form class="form-inline" method="get" action="admin.php" >
										<input type="hidden" name="uid" value="$_GET[uid]" />
				                        <input type="hidden" name="ac" value="user_profile" />
				                        <input type="hidden" name="op" value="cloudRemoveByUid" />
				                        <Button class="btn" onclick="ajaxgetform($('#remove'));return false;" >删除用户同步记录</button>
									</form>
								</td>
						    </tr>
						      -->
					    </tbody>
					</table>
				</div>
				
	            <div>
	            	<ul class="thumbnails">
	            		<li><a href="admin.php?ac=count_diary&query=1&uid1={$userData['userInfo'][uid]}&uid2={$userData['userInfo'][uid]}" target="_blank" class="btn">点击查看用户日记列表</a></li>
	            		<li><a href="admin.php?ac=count_topic&query=1&gid=1&uid={$userData['userInfo'][uid]}" target="_blank" class="btn">点击查看用户话题列表</a></li>
	            	</ul>
	            </div>
            </div>
        </div>
    </div>
	<script type="text/javascript" src="static_v2/js/jquery.js"></script>
	<script type="text/javascript" src="static_v2/layer/layer.js"></script>
	<script type="text/javascript" src="static_v2/laytpl/laytpl.js"></script>
	<script type="text/html" id="jinyan">
		<form action="">
			<label>选项</label>
			<select name="" id="jinyan_msg">
				<option value="">无</option>
				<option value="发布垃圾广告">发布垃圾广告</option>
				<option value="虚假中奖">虚假中奖</option>
				<option value="淫秽色情">淫秽色情</option>
				<option value="敏感信息">敏感信息</option>
				<option value="隐私泄露">隐私泄露</option>
				<option value="不实消息">不实消息</option>
				<option value="冒充他人">冒充他人</option>
				<option value="骚扰他人">骚扰他人</option>
				<option value="内容抄袭">内容抄袭</option>
				<option value="人身攻击">人身攻击</option>
				<option value="恶意刷屏">恶意刷屏</option>
			</select>
			<label>UID</label><input type="text" id="jinyan_id" name="uid" value="{$_GET['uid']}">
			<label>补充说明:</label><textarea cols="10" rows="5" id="buchong"></textarea>
		</form>
	</script>
	<script type="text/javascript">
		$(function () {
			$('.jinzhishuoming').on('click',function () {
			    layer.open({
			        content:$('#jinyan').html(),
                    yes:function () {
			            var a = $('#buchong').val()
						var b = $('#jinyan_msg').val()
						var uid = $('#jinyan_id').val()
						var msg = '';
			     		if(a){
			               msg = a;
						}else{
			     		    msg = b;
						}
						var url ='admin.php?ac=user_profile&op=jinyanmsg&msg='+msg+'&uid='+uid;
						$.ajax({
                            type:'GET',
						    url:url,
                           	dataType:'json',
							success: function (data) {
                                if(data == 1){
                            			$('#shutUpUser').submit();
								}
                            }
						})
                    }
				})
	        });
        })
	</script>

    <!--{template admin/leftside}-->
    <!--{template admin/footer}-->